package com.adcc.pushXml.constant;

import com.adcc.pushXml.core.FlightPos;
import com.adcc.pushXml.core.Parameter;
import com.google.common.collect.Maps;

import java.util.Map;

/**
 * @author LHB
 * @date 2019/11/22 17:57
 */
public interface Constant {
    /**
     * 报文存储集合
     */
      Map<String, FlightPos> recvMsgs = Maps.newConcurrentMap();
    /**
     * 飞机油重
     */
    Map<String, Double> heavyOil = Maps.newConcurrentMap();

    /**
     * port 50000 xmlmode
     */
     String  PORT500XMLMODE="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
            "<method name=\"publishAvionicParameters\">" +
            "  <refreshperiod>500</refreshperiod>" +
            "  <context>" +
            "    <key name=\"SEQUENCE_ID\" value=\"1\"/>" +
            "    <key name=\"TOTAL_MSG_PARTS\" value=\"1\"/>" +
            "  </context>" +
            "  <parameters>" +
            "    <parameter name=\"BAROCORRALT\" type=\"0\" validity=\"0\" value=\"\" time=\"1545298946704\"/>" +
            "    <parameter name=\"COMPUTEDAIRSPEED\" type=\"0\" validity=\"1\" value=\"0.00\"/>" +
            "    <parameter name=\"GPSHDOP\" type=\"0\" validity=\"1\" value=\"0.500\"/>" +
            "    <parameter name=\"GPSLATFINE\" type=\"0\" validity=\"1\" value=\"-0.00007625781291\"/>" +
            "    <parameter name=\"GPSLATITUDE\" type=\"0\" validity=\"1\" value=\"50.02779007\"/>" +
            "    <parameter name=\"GPSLONGFINE\" type=\"0\" validity=\"1\" value=\"0.00004308398275\"/>" +
            "    <parameter name=\"GPSLONGITUDE\" type=\"0\" validity=\"1\" value=\"8.53483200\"/>" +
            "    <parameter name=\"GPSTRACKANGLE\" type=\"0\" validity=\"1\" value=\"69.53\"/>" +
            "    <parameter name=\"GROSSWEIGHT\" type=\"0\" validity=\"0\" value=\"\"/>" +
            "    <parameter name=\"IRSGROUNDSPEED\" type=\"0\" validity=\"1\" value=\"0.00\"/>" +
            "    <parameter name=\"IRSTRUEHEADING\" type=\"0\" validity=\"1\" value=\"69.53\"/>" +
            "    <parameter name=\"SYSTEMTIME\" type=\"8\" validity=\"1\" value=\"09:40:30\"/>" +
            "    <parameter name=\"TAILNUMBER\" type=\"7\" validity=\"0\" value=\"\"/>" +
            "    <parameter name=\"TOTALFUELWEIGHT\" type=\"0\" validity=\"1\" value=\"28120\"/>" +
            "    <parameter name=\"TRUEAIRSPEED\" type=\"0\" validity=\"1\" value=\"0.00\"/>" +
            "  </parameters>" +
            "</method>";
    /**
     * port 50001 xmlmode
     */
     String  PORT501XMLMODE="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
            "<method name=\"publishAvionicParameters\"> " +
            "  <refreshperiod>500</refreshperiod>  " +
            "  <context> " +
            "    <key name=\"SEQUENCE_ID\" value=\"1\"/>  " +
            "    <key name=\"TOTAL_MSG_PARTS\" value=\"1\"/> " +
            "  </context>  " +
            "  <parameters> " +
            "    <parameter name=\"ALTITUDERATE\" type=\"0\" validity=\"1\" value=\"0.0\" time=\"1545298929705\"/>  " +
            "    <parameter name=\"DESTINATION\" type=\"7\" validity=\"0\" value=\"\"/>  " +
            "    <parameter name=\"DMEDISTANCE\" type=\"0\" validity=\"0\" value=\"\"/>  " +
            "    <parameter name=\"FLIGHTNUMBER\" type=\"7\" validity=\"0\" value=\"\"/>  " +
            "    <parameter name=\"FrameCounter\" type=\"0\" validity=\"0\" value=\"\"/>  " +
            "    <parameter name=\"MACH\" type=\"0\" validity=\"1\" value=\"0.000\"/>  " +
            "    <parameter name=\"MAGHEADING\" type=\"0\" validity=\"1\" value=\"68.38\"/>  " +
            "    <parameter name=\"ORIGIN\" type=\"7\" validity=\"0\" value=\"\"/>" +
            "    <parameter name=\"STATICAIRTEMP\" type=\"0\" validity=\"1\" value=\"13.50\"/>" +
            "    <parameter name=\"SYSTEMDATE\" type=\"8\" validity=\"1\" value=\"10/09/12\"/>  " +
            "    <parameter name=\"TOTALAIRTEMP\" type=\"0\" validity=\"1\" value=\"13.50\"/>  " +
            "    <parameter name=\"WINDDIRECTION\" type=\"0\" validity=\"1\" value=\"0.00\"/>  " +
            "    <parameter name=\"WINDSPEED\" type=\"0\" validity=\"1\" value=\"0.00\"/> " +
            "  </parameters>" +
            "</method>";
    /**
     * xml element
     */
    String PARAMETERS="parameters";
    String CONTEXT="context";
    String VALUE="value";
}
